home *** CD-ROM | disk | FTP | other *** search
-
- (* Listing 3: BYTE floating point calculation benchmark in Turbo Pascal. *)
-
- { copywrited 1984 by Laine Stump. For private, non-commercial use only }
-
- PROGRAM calc (output);
-
- CONST
- nr = 5000;
- a = 2.71828;
- b = 3.14159;
-
- VAR
- c : real;
- i : integer;
-
- begin
- c := 1;
- FOR i := 1 to nr DO
-
- begin
- c := c * a;
- c := c * b;
- c := c / a;
- c := c / b;
- end; { for i := 1 to nr }
-
- writeln ('done');
- writeln ('error = ', c-1);
- end. { calc }
-
-
-
-
-